home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacTech 1 to 12
/
MacTech-vol-1-12.toast
/
Tools
/
Mac F2C 1.3.3
/
Mac F2C Extras
/
F2C CW MPW⁄ToolServer Tools
/
ToolServer READ ME
< prev
Wrap
Text File
|
1995-10-31
|
4KB
|
115 lines
USING MPW TOOLS WITH CODEWARRIOR IDE, TOOLSERVER AND MAC F2C
The folder "MPW/Toolserver Tools" contains three MPW tools: F2CMake,
CWMake and CWOpen.
Metrowerks CodeWarrior comes with the complete MPW environment and with
Toolserver, a program that lets you execute MPW tools and scripts.
If you start Toolserver from the CW environment, you get a text shell
window where you can type commands. Please refer to the Toolserver
documentation on the CW CD for more information.
F2CMake accepts a command line string containing Unix style options and
one or more filenames to send them in a "kAEf2cEvent" AppleEvent to
Mac F2C which will translate the file(s). If Mac F2C is not currently
running, F2CMake will try to launch it.
CWMake simply sends a "Make" event to the CW enviroment that is
currently running (IDE, PPC C or 68K C).
CWOpen sends an 'Open' AppleEvent to the CW IDE, PPC C or 68K C compiler,
whichever is currently running. The command line should contain the
name(s) of the file(s) to open.
With the help of these tools you can automate the building process
of Fortran programs. You can edit your Fortran files and just execute
a Makefile which scans all the files belonging to a project, tells
Mac F2C to translate the ones that have to and tells CW to build the
program. CWOpen is not needed in this progress, but it is useful if
you would like to open, say, all the .e files that Mac F2C produces
(Just type "CWOpen ≈.e" in the Toolserver shell window).
INSTALLATION
- Copy "F2CMake", "CWMake" and "CWOpen" into the "Tools" folder
that Toolserver uses
- Copy "F2C.Help" into the Toolserver folder.
- Copy "Make" from the MPW distribution into the same folder
- Copy the MPW script "BuildProgram" into the "Scripts"
folder of Toolserver
- Set the appropiate options in the "Compiler Interactions..."
dialog of Mac F2C. You can uncheck all options if you want
your makefile to control the build process completely, but
it makes sense to set the interaction mode to "Touch changed
files" and check the "Add output C/C++ files to active project
as necessary".
USAGE
First Build:
- Use Mac F2C manually to translate your Fortran source
into C.
- Add the resulting C sources to the "Empty" project and let
CW make the program.
- Enter a Makefile like this one in a new editor window:
OBJECTS = prog1.c ∂
prog2.c ∂
prog3.c ∂
prog4.c
Basistest ƒƒ {OBJECTS}
CWMake
.c ƒ .f
F2CMake -f -!i8 -A -a -E -ec -R -w66 {Default}.f
The source file names (prog1.c, prog2.c,...) as well as the
F2C options are just examples.
- Save the Makefile under the name "Makefile" into your
project folder.
Subsequent Builds:
- Start Toolserver.
- Use the "Directory" command to move to your project folder.
- Edit your Fortran source files.
- Type "BuildProgram <name>", where <name> is the name of the
program as given in the CW Preferences of your project.
The commands needed to update the project are executed and
written to the shell window. Mac F2C runs faster if you bring
it to the foreground.
If you need help about one of the F2C MPW tools, type
help -f "{MPW}F2C.Help" toolname
If you don't like to type long command names (like me), include a
few alias entries in your "UserStartupTS" file, e.g.
Alias cd Directory
Alias touch setfile -m .
Alias edit CWOpen
Alias pmake BuildProgram
You can even include a "Directory <whereYourProjectsAre>" command
here so you don't have to type the pathname all the time.